import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)


let originPush =  VueRouter.prototype.push;
VueRouter.prototype.push = function (location, resolve, reject){
  if (resolve && reject) { 
    originPush.call(this, location, resolve, reject);
  }else { 
    originPush.call(this, location, ()=>{}, ()=>{}); 
  }
}



const router = new VueRouter({
  routes
})
export default router
